//
//  SocketAckManager.h
//  Socket.IO-Client
//
//  Created by alanwang.dev on 16/8/8.
//  Copyright © 2016年 com.alanwang.dev. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SocketTypes.h"
@interface SocketAck : NSObject

@property (nonatomic, assign) NSInteger ack;
@property (nonatomic, copy) AckCallback callback;
@property (nonatomic, assign) NSInteger hashValue;

- (instancetype)initWithAck:(NSInteger)ack;

- (instancetype)initWithAck:(NSInteger)ack andCallback:(AckCallback)callback;
@end



@interface SocketAckManager : NSObject

@property (nonatomic, strong) NSMutableArray *acks;

- (void)addAck:(NSInteger)ack callback:(AckCallback)callback;

- (void)executeAck:(NSInteger)ack items:(NSArray *)items;

- (void)timeoutAck:(NSInteger)ack;

@end
